#ifndef LCD_DRIVER_H
#define LCD_DRIVER_H

#include <C8051F330.H>
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include "gps.h"

//pin definitions 
sbit LCD_RS		= P0^0;
sbit LCD_RW		= P0^1;
sbit LCD_E		= P1^7;
sbit EEPROM_SEL	= P1^6;
sbit RF_SEL		= P0^2;

#define GPRMC_READY 1
#define GPGGA_READY 2
#define GPS_DUMP	3
#define GPS_LOG_HEADER	0x69

//globals
extern float xdata prev_speed, curr_speed, trip, odometer, temp_pos;
extern unsigned char xdata pos_line[30];
extern unsigned char xdata temp_pos_str[11];
extern unsigned int xdata temp_int;
extern unsigned int xdata curr_alt;
extern unsigned char splash[80];
extern unsigned char xdata back_slash[8];
extern unsigned char xdata degrees[8];
extern gps_log xdata gl;
extern unsigned short gps_page_ptr;
extern volatile unsigned short gps_byte_ptr;
extern unsigned char xdata xmitFlag;
void lcd_command_delay(unsigned short del);
void byte_clock(char command, unsigned short del);

#endif
